import java.awt.Color;


public class DrawNode {

	
	private String processName;
	private int arrivalTime;
	private int startTime;
	private int endTime;
	private Color color;
	private int drawn;
	private boolean drawnComplete;
	
	//The default constructor will make No Process Place Holder
	public DrawNode(int startTime) {
		this.processName = new String("NPA");
		this.color = Color.LIGHT_GRAY;
		this.startTime = startTime;
		this.endTime = startTime;
	}
	
	public DrawNode(String processName, Color color, int startTime, int endTime, int arrivalTime) {
		this.processName = processName;
		this.startTime = startTime;
		this.endTime = endTime;
		this.color = color;
		this.arrivalTime = arrivalTime;
	}
	public int getArrivalTime() {
		return arrivalTime;
	}

	public void setArrivalTime(int arrivalTime) {
		this.arrivalTime = arrivalTime;
	}

	public int getDrawSize() {
		drawn++;
		if(drawn > endTime - startTime)
			drawnComplete = true;
		return drawn;
	}
	
	public boolean isDrawComplete(){
		return drawnComplete;
	}
	
	public int getServiceTime()
	{
		return (endTime - startTime);
	}
	public String getProcessName() {
		return processName;
	}

	public void setProcessName(String processName) {
		this.processName = processName;
	}


	public int getStartTime() {
		return startTime;
	}

	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}

	public int getEndTime() {
		return endTime;
	}

	public void setEndTime(int endTime) {
		this.endTime = endTime;
	}
	public void incrementEndTime()
	{
		endTime++;
	}
	public Color getColor() {
		return color;
	}


	public void setColor(Color color) {
		this.color = color;
	}
	public boolean hasProcess()
	{
		//No Process Available
		return !processName.equals("NPA");
	}
	
}
